package com.lanp.springredis.config;

import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
/**
 * @author jiangpeng
 * Created with IntelliJ IDEA.
 * Description:  redis常用库,方便管理与理解
 * Date: 2022-02-26 14:11:29
 */
//@Component
public class RedisCmt {

    @Resource(name = RedisConfig.PRODUCT_REDIS_TEMPLATE)
    private StringRedisTemplate productRedis;

    @Resource(name = RedisConfig.CATEGORY_REDIS_TEMPLATE)
    private StringRedisTemplate categoryRedis;

    public StringRedisTemplate dbForProduct() {
        return productRedis;
    }

    public StringRedisTemplate dbForCategory() {
        return categoryRedis;
    }
}
